﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace PhotoViewerDesktop
{
    public partial class InputBoxCateg : Form
    {
        MainForm mainform;
        //This form gets from the user the name of the new category created
        public InputBoxCateg(MainForm mainform)
        {
            this.mainform = mainform;
            InitializeComponent();
        }

        //This function sends the new category name to the main application
        private void BtnOk_Click(object sender, EventArgs e)
        {
            this.mainform.AddCategory(TxBNewCateg.Text);
            this.Close();
        }

        private void BtCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
